home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Applications / Pict2Ascii 1.03 / Utils / GreyGWorld.h < prev    next >
Encoding:
Text File  |  1997-05-19  |  816 b   |  33 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //    GreyGWorld.h                                    ©1997 BB's Team inc. All rights reserved
  3. // =================================================================================
  4.  
  5. #pragma once
  6.  
  7. class GreyGWorld {
  8.  
  9.     public:
  10.                                 GreyGWorld (void);
  11.                                 GreyGWorld (Rect&);
  12.         virtual                 ~GreyGWorld ();
  13.         void                    SetRect (Rect&);
  14.  
  15.         operator GWorldPtr()            { return mGW;    }
  16.         operator GrafPtr()            { return (GrafPtr)mGW;    }
  17.  
  18.         void                    MakeRoom(void);
  19.         void                    Lock(void);
  20.         void                    Unlock(void);
  21.         Boolean                IsOK (void);
  22.         float                    ComputeGrey (Rect &r);
  23.         float                    ComputeGrey (void);
  24.         Rect                    Bounds (void);
  25.         
  26.     protected:
  27.  
  28.         GWorldPtr            mGW;
  29.         PixMapHandle        mPM;
  30.         Int16                    mLock;
  31.         Int16                    mStep;    // bytes between two lines in the pixmap
  32. };
  33.